﻿{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">编辑产品 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" action="__URL__/update/">
<table cellpadding=3 cellspacing=3 >
<tr>
    <td>产品名</td>
    <td><input id="" name="name" type="text" class="input-xxlarge"  value="{$vo.name}"/> </td>
</tr>
<tr>
    <td>编码</td>
    <td>{$vo.mano}  &nbsp;&nbsp;共计：{$plist|count} 货品
<input id="" name="is_create_goods" type="checkbox" />同时生成唯一货品</td>
</tr>
<tr>
	<td class="tRight" >品牌：</td>
	<td class="tLeft" >
    {:modList('Brand',$vo['brand_id'])}
    </td>
</tr>

<tr>
	<td class="tRight" >注册证号：</td>
	<td class="tLeft" >
            <input type="text" name="regcode" value="{$vo.regcode}" class="input-xxlarge">
        </td>
</tr>
<tr>
	<td class="tRight" >人工编码：</td>
	<td class="tLeft" >
            <input type="text" name="helpword" value="{$vo.helpword}" class="large">默认拼音首字母，方便快速查询
        </td>
</tr>
<tr>
	<td class="tRight" >类别：</td>
        <td class="tLeft" >
            <select name="cat_id">
                <option value="0" selected >无上级分类</option>
                <volist name="cate_list" id="list">
                    <option value="{$list.id}" <eq name='vo.cat_id' value='$list.id'>selected</eq>  >{$list.level}{$list.name}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
	<td class="tRight" >单位：</td>
	<td class="tLeft" >{:modList('Unit',$vo['unit_id'])}
        </td>
</tr>
<tr>
	<td class="tRight" >默认供应商：</td>
	<td class="tLeft" >{:modList('Supplier',$vo['supplier_id_default'],'span2','supplier_id_default')}
        </td>
</tr>
<tr>
    <td class="tRight" >默认仓库：</td>
    <td class="tLeft" >{:modList('Warehouse',$vo['warehouse_id'],'span2','warehouse_id')}
        </td>
</tr>
<tr>
	<td class="tRight" >默认进价：</td>
	<td class="tLeft" >
            <input type="text" name="cost_default" value="{$vo.cost_default}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >默认零售价：</td>
	<td class="tLeft" >
            <input type="text" name="sale_price_default" value="{$vo.sale_price_default}" class="large">
        </td>
</tr>
<tr>
	<td class="tRight" >默认批发价：</td>
	<td class="tLeft" >
            <input type="text" name="wholesale_price_default" value="{$vo.wholesale_price_default}" class="large">
        </td>
</tr>

<tr>
	<td class="tRight tTop">备注：</td>
	<td class="tLeft"><textarea class="large bLeft"  name="remark" style="width:650px;height:100px;">{$vo.remark}</textarea></td>
</tr>
<tr>
	<td class="tRight">状态：</td>
	<td class="tLeft"><SELECT class="small bLeft"   name="status">
	<option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
	<option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
	</SELECT></td>
</tr>
<tr>
	<td></td>
	<td class="center">
        <input type="hidden" value="{$vo.id}" name="id">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</table>
<h3>共计{$plist|count}  货品</h3>
<table class="table table-bordered table-striped">
    <tr>
        <th>编号</th>
        <th>货品</th>
        <th>规格</th>
        <th>编码</th>
    </tr>
    <volist name="plist" id ="po">
    <tr>
        <td>{$po.id}</td>
        <td><a href="__APP__/Product/edit/id/{$po.id}"> {$po.name}</a> </td>
        <td>
       
    <php>
       $options = getGoodsDetail($po['id']);
    </php> 
       <volist name="options.option" id='op'>
       {$op.option}:{$op.name}<br>      
       </volist>  
        </td>
        <td>{$po.pnumber}</td>
    </tr>
    </volist>
</table>
</form>
</div>
</div>
